cmake_minimum_required(VERSION 3.14)
project(env)
set(CMAKE_BUILD_TYPE release)
list(APPEND CMAKE_PREFIX_PATH "C:/Users/xd15zhn/Documents/cpplibraries")
set(MinGW_PATH "C:/Users/xd15zhn/Documents/mingw64/bin")
# set(CMAKE_SHARED_LINKER_FLAGS "-static-libgcc -static-libstdc++")
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
find_package(Python3 COMPONENTS NumPy REQUIRED)
find_package(SWIG REQUIRED)
find_package(simucpp REQUIRED)
message(STATUS "Python3_LIBRARIES: ${Python3_LIBRARIES}")
message(STATUS "Python3_INCLUDE_DIRS: ${Python3_INCLUDE_DIRS}")
message(STATUS "Python3_NumPy_INCLUDE_DIRS: ${Python3_NumPy_INCLUDE_DIRS}")
message(STATUS "simucpp_VERSION: ${simucpp_VERSION}")
message(STATUS "simucpp_DIR: ${simucpp_DIR}")
message(STATUS "simucpp_LIBS: ${simucpp_LIBS}")
message(STATUS "simucpp_INCLUDE_DIRS: ${simucpp_INCLUDE_DIRS}")

include(UseSWIG)
set(env_INTERFACE
    ${PROJECT_SOURCE_DIR}/env.i
)
set(env_SOURCES
    ${PROJECT_SOURCE_DIR}/env.cpp
)
set_source_files_properties(${env_INTERFACE} PROPERTIES CPLUSPLUS ON)
swig_add_library(env LANGUAGE python SOURCES ${env_INTERFACE} ${env_SOURCES})

target_include_directories(env PUBLIC
    ${PROJECT_SOURCE_DIR}
    ${Python3_INCLUDE_DIRS}
    ${Python3_NumPy_INCLUDE_DIRS}
    ${simucpp_INCLUDE_DIRS}
)
target_link_libraries(env PUBLIC
    ${Python3_LIBRARIES}
    ${simucpp_LIBS}
)
